package com.yanq.liancar.adapter;
/*
 *  @创建者     Administrator
 *  @创建时间   2018/10/23  16:52
 *  @描述       ${TODO}
 */


import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.ConsumptionIntegralBean;
import com.yanq.liancar.bean.IntegralDetailBean;

import java.util.List;

public class IntegralDetailAdapter1 extends BaseQuickAdapter<ConsumptionIntegralBean.DataBean.ListBean, BaseViewHolder> {
    public IntegralDetailAdapter1(int layoutResId, @Nullable List<ConsumptionIntegralBean.DataBean.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ConsumptionIntegralBean.DataBean.ListBean item) {
        helper.setText(R.id.tv_Getintegral, "消费" + item.getNumber().substring(1) + "积分")
                .setText(R.id.tv_time, item.getCreate_time())
                .setText(R.id.tv_source, item.getText());

        //        TextView textView=helper.getView(R.id.tv_source);
        //        if (item.getSrcType()==1){
        //            textView.setText("优驾抽奖获得");
        //        }else if (item.getSrcType()==2){
        //            textView.setText("停驶抽奖获得");
        //        }else {
        //            textView.setText("签到抽奖获得");
        //        }


    }
}
